import requests


url ="http://localhost:6800/schedule.json"
data={
    'project':'default',
    'spider':'main',
    'param1':'value1'
}
# rep=requests.post(url,data=data)


# 


# 发送 POST 请求
try:
    response = requests.post(url, data=data)

    # 检查响应状态码
    response.raise_for_status()
    

    # 打印响应内容
    # print(response.)
    print('Response:', response.json())
except requests.exceptions.RequestException as e:
    print('Request failed:', e)